﻿{extend name="public:base" /}{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
{/block}
{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="iconfont icon-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>用户</th>
                                <th>车辆</th>
                                <th>创建订单状态</th>
                                <th>是否结束</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.username} / {$vo.mobile}</td>
                                {if $vo.number}
                                <td>{$vo.number} / {$vo.model} / {$vo.price}元</td>
                                {else /}
                                <td>/</td>
                                {/if}
                                <td>{$vo.order_id == 0 ? '未创建' : '已创建'}</td>
                                <td>{$vo.is_end == 1 ? '已结束' : '未结束'}</td>
                                <td>{:timeFormat($vo.create_time)}</td>
                                <td class="project-actions">
                                    {if $vo.order_id == 0 && $vo.is_end == 0}
                                    <a href="{:url(createOrder, ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-xinzeng"></i> 创建订单 </a>
                                    {/if}
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/preview-img-mask" swiper-id="cropper-preview" /}
{/block}

{block name="js"}
<script src="/static/laydate/laydate.js"></script>
{/block}
